<%@ page pageEncoding="utf-8"%>
<%@ page import="java.util.*,edu.pet.entity.*" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="allpage.css" >
    <title>宠物诊所</title>
  </head>
  <script type="text/javascript" src="../user/table_style.js"></script>
  <body>
  <%
  		ArrayList<History> historyList = (ArrayList<History>)session.getAttribute("historyList");
  		Iterator<History> iter = historyList.iterator();
		while(iter.hasNext()){
			History one = (History)iter.next();
			System.out.println(one.getDate() + one.getDescirption());
		}
  %>
	  <div class="background">
	  	<jsp:include page="suc.jsp"></jsp:include>
	  	<div class="contentDiv">
	  		<table align="center" width="400px">
	  			<tr>
	  				<td width="50%">宠物名称</td>
	  				<td>${pet.name }</td>
	  			</tr>
	  			<tr>
	  				<td>宠物类型</td>
	  				<td>${pet.type }</td>
	  			</tr>
	  			<tr>
	  				<td>宠物主人</td>
	  				<td>${pet.owner_name }</td>
	  			</tr>
	  			<tr>
	  				<td colspan="2">&nbsp;</td>
	  			</tr>
	  			<tr>
	  				<td>诊断时间</td>
	  				<td>备注</td>
	  			</tr>
	  			<c:forEach items="${historyList}" var="history">
	  				<tr>
		  				<td>${history.date }</td>
		  				<td>${history.descirption }</td>
	  				</tr>
	  			</c:forEach>
	  			<tr>
	  				<td colspan="2" align="center"><input type="button" value="返回" onclick="javascript:window.location='petinfo.jsp'"/></td>
	  			</tr>
	  		</table>
	  	</div>
	  </div>
  </body>
</html>
